Skip to content

feat: export SourceType enum #886

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

codebutler
Copy link

@codebutler codebutler commented Apr 15, 2025

Describe the issue/change

Gives consumers of this library a way to properly avoid triggering the eslint rule @typescript-eslint/no-unsafe-enum-comparison.

Add CodeSandbox link to illustrate the issue (If applicable)

Describe specs for failing cases if this is an issue (If applicable)

Describe the changes proposed/implemented in this PR

Add export.

Link Github issue if this PR solved an existing issue

Example usage (If applicable)

import { SourceType } from "react-number-format";

onValueChange={(values, sourceInfo) => {
  if (sourceInfo.source === SourceType.event) {
    // do something
  }
}}

Screenshot (If applicable)

Please check which browsers were used for testing

  • Chrome
  • Chrome (Android)
  • Safari (OSX)
  • Safari (iOS)
  • Firefox
  • Firefox (Android)

Gives consumers of this library a way to properly avoid triggering the eslint rule `@typescript-eslint/no-unsafe-enum-comparison`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant